<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background: red;

        }
    
    </style>
</head>
<body>
    <div>

    </div>
    <script>
        
    var div =document.querySelector('div');
    var starttime , startX,startY;
    div.addEventListener('touchstart',function(e){
        //只有一根手指
        if(e.targetTouches.length>1){
            return;
        }
        starttime = Date.now();

        startX = e.targetTouches[0].clientX;
        startY = e.targetTouches[0].clientY;

    })
    
    div.addEventListener('touchend',function(e){
        console.log(e)
        if(e.changedTouches.length>1){
            return;
        }
        if(Date.now()-starttime > 150){
            return
        }
       var endX = e.changedTouches[0].clientX;
       var endY = e.changedTouches[0].clientY;
       if(Math.abs(endX-startX) <6 && Math.abs(endY-startY)<6){
           console.log('模拟click事件')
       }
    })
     
    
    </script>
</body>
</html>